/**
 * 测试各种 JSDoc 规则
 */

/**
 * 函数缺少参数文档 (应该触发警告)
 */
function missingParamDocs(name, age) {
  return `${name} is ${age} years old`;
}

/**
 * 参数名不匹配的函数
 * @param {string} wrongName - 参数名错误 (应该触发 jsdoc/check-param-names)
 */
function wrongParamName(correctName) {
  return `Hello ${correctName}`;
}

/**
 * 缺少返回值描述
 * @returns (应该触发 jsdoc/require-returns-description)
 */
function missingReturnDesc() {
  return 'test';
}

/**
 * 有多个星号的注释 (应该触发 jsdoc/no-multi-asterisks)
 ****
 * @param {string} text - 文本
 */
function correctJSDoc(name, age) {
  return `Hello ${name}, you are ${age} years old!`;
}

function multiAsterisks(text) {
  return text;
}

module.exports = {
  correctJSDoc,
  missingParamDocs,
  missingReturnDesc,
  multiAsterisks,
  wrongParamName,
};
